GtkComboBox: Add private api to get the popup
authorMatthias Clasen <mclasen@redhat.com>
Tue, 10 Jun 2014 12:47:27 +0000 (08:47 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 10 Jun 2014 12:54:12 +0000 (08:54 -0400)
This will be used to make the popup appear in the inspector.

gtk/Makefile.am
gtk/gtkcombobox.c
gtk/gtkcomboboxprivate.h [new file with mode: 0644]

index d9f372de3024b3e288f536ef600780784b781356..e3cc5de00c5864d5da004d5ce5700f5a1e9a8e51 100644 (file)
@@ -521,6 +521,7 @@ gtk_private_h_sources =             \
        gtkcolorplaneprivate.h  \
        gtkcolorscaleprivate.h  \
        gtkcolorchooserprivate.h        \
+       gtkcomboboxprivate.h    \
        gtkcontainerprivate.h   \
        gtkcssanimationprivate.h        \
        gtkcssarrayvalueprivate.h       \
index 0e8e75ccc47b6dda8cc11be22e13d6e5444a4473..baeb30de8d9f4df1a6dbfca1661d817e06dd4cda 100644 (file)
@@ -44,6 +44,7 @@
 #include "gtkwindow.h"
 #include "gtktypebuiltins.h"
 #include "gtkprivate.h"
+#include "gtkcomboboxprivate.h"
 
 #include <gobject/gvaluecollector.h>
 
@@ -5919,3 +5920,12 @@ gtk_combo_box_set_active_id (GtkComboBox *combo_box,
 
   return match;
 }
+
+GtkWidget *
+gtk_combo_box_get_popup (GtkComboBox *combo)
+{
+  if (combo->priv->popup_window)
+    return combo->priv->popup_window;
+  else
+    return combo->priv->popup_widget;
+}
diff --git a/gtk/gtkcomboboxprivate.h b/gtk/gtkcomboboxprivate.h
new file mode 100644 (file)
index 0000000..6af67e0
--- /dev/null
@@ -0,0 +1,29 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GTK_COMBO_BOX_PRIVATE_H__
+#define __GTK_COMBO_BOX_PRIVATE_H__
+
+#include "gtkcombobox.h"
+
+G_BEGIN_DECLS
+
+GtkWidget *gtk_combo_box_get_popup (GtkComboBox *combo_box);
+
+G_END_DECLS
+
+#endif /* __GTK_COMBO_BOX_PRIVATE_H__ */